//***********************************************************************
//	File:		HeatSeeker.h
//	Author:		
//	Course:		SGP 1405
//	Purpose:	
//***********************************************************************
//***********************************************************************
//	Purposfully left blank for all comments regarding this file 
//	
//	
//	
//***********************************************************************



#pragma once
#include "Projectile.h"
#include "../SGD Wrappers/SGD_Listener.h"
class HeatSeeker :
	public Projectile, SGD::Listener
{
public:
	//Trilogy
	HeatSeeker(float posX = -1, float posY = -1, Entity* owner = nullptr);
	~HeatSeeker() = default;
	HeatSeeker(const HeatSeeker&) = default; 
	HeatSeeker& operator =(const HeatSeeker&) = default;

	//Type
	int GetType() const { return ENT_HEATSEEKER; }

	//Interface
	void Update(float dt);
	void Render();
	void HandleCollision(const IEntity* pOther);
	void HandleEvent(const SGD::Event*);
	SGD::Rectangle GetRect() const;

	// Heatseeker special
	void UpdateTarget();

	//Accessors
	float	GetTurnRate		(void)			{ return m_fTurnRate; }
	Entity*	GetTarget		(void)			{ return m_pTarget; }
	float	GetAcceleration(void)			{ return m_fAcceleration; }


	//Mutators
	void SetTurnRate	(float tr)		{ m_fTurnRate = tr; }
	void SetTarget		(Entity* tar)	{ m_pTarget = tar; }
	void SetAcceleration(float accel)	{ m_fAcceleration = accel; }

private:
	float m_fTurnRate = 0.0f; 
	Entity* m_pTarget = nullptr;
	float m_fAcceleration = 0; 
};

